package com.zyb.beidada.model.enums;

/**
 * @author 十八岁讨厌编程
 * @date 2025/5/5 14:21
 * @PROJECT_NAME beidada-backend
 * @description 审核状态：0-待审核, 1-通过, 2-拒绝
 */

public enum ReviewStatusEnum {
    /**
     * 待审核
     */
    PENDING(0),

    /**
     * 通过
     */
    APPROVED(1),

    /**
     * 拒绝
     */
    REJECTED(2);

    private final Integer value;

    ReviewStatusEnum(Integer value) {
        this.value = value;
    }

    public Integer getValue() {
        return value;
    }

    public static ReviewStatusEnum fromValue(Integer value) {
        for (ReviewStatusEnum status : ReviewStatusEnum.values()) {
            if (status.getValue().equals(value)) {
                return status;
            }
        }
        throw new IllegalArgumentException("Unknown value: " + value);
    }
}
